package com.wj.jiangan.controller;


import com.wj.jiangan.pojo.Stock;
import com.wj.jiangan.service.IStockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 库存前端控制器
 * </p>
 *
 * @author wj
 * @since 2019-11-05
 */
@RestController
@RequestMapping("/stock")
public class StockController {

    @Autowired
    private IStockService stockService;



    @GetMapping("{pid}")
    public Stock getStockByPid(@PathVariable Integer pid) {
        return stockService.getStockByPid(pid);
    }
}
